home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel0_89.lha / Feel / Modules / standard0.em < prev    next >
Lisp/Scheme  |  1993-07-15  |  1KB  |  54 lines

  1. ;; Eulisp Module
  2. ;; Author: pab
  3. ;; File: standard0.em
  4. ;; Date: Thu Dec 17 16:03:19 1992
  5. ;;
  6. ;; Project:
  7. ;; Description: 
  8. ;;
  9.  
  10. (defmodule standard0
  11.   (standard
  12.    )
  13.   ()
  14.   (expose (except (scan-args fold) standard))
  15.  
  16.   (export slot-description-initargs slot-value
  17.       class-direct-slot-descriptions
  18.       allocate-instance 
  19.       make-instance initialize-instance
  20.       generic-function-method-class
  21.       slot-value-using-slot-description
  22.       class-direct-slot-descriptions)
  23.  
  24.   (defconstant make-instance make)
  25.   (defconstant allocate-instance allocate)
  26.   (defconstant initialize-instance initialize)
  27.   (defconstant generic-function-method-class generic-method-class)
  28.  
  29.   (defun slot-description-initargs (x)
  30.     (if (slot-description-initarg x)
  31.     (list (slot-description-initarg x))
  32.       nil))
  33.   
  34.   (defun slot-value (obj name)
  35.     ((slot-description-slot-reader (find-slot-description (class-of obj) name)) obj))
  36.  
  37.   ((setter setter) slot-value
  38.    (lambda (obj name value)
  39.      ((slot-description-slot-writer (find-slot-description (class-of obj) name)) obj value)))
  40.  
  41.   (defun slot-value-using-slot-description (o s)
  42.     ((slot-description-slot-reader s) o))
  43.  
  44.   ((setter setter) slot-value-using-slot-description 
  45.    (lambda (o s v)
  46.      ((slot-description-slot-writer s) o v)))
  47.  
  48.   (defconstant class-direct-slot-descriptions class-slot-descriptions)
  49.   (defconstant pair <pair>)
  50.  
  51.   (export pair)
  52. ;; end module
  53.   )
  54.